use craftdig_datamodel::entity::{self, EntityId};
use craftdig_math::{ChunkCoord, Vec3f};

/// Callback trait passed from a game implementation to the core client every
/// frame for the client to signal world changes.
pub trait SceneController {
    /// Marks a chunk as needing refresh.  May be called multiple times on the
    /// same frame, should only be re-rendered once.
    fn flag_dirty_chunk(&mut self, cc: ChunkCoord);

    /// Shows a chat message on screen.
    fn show_chat_message(&mut self, msg: String);

    /// Sets the rendered position of an entity in the world.
    ///
    /// This is interpolated across ticks.  This can be the player.
    fn set_entity_position(&mut self, entity: EntityId, pos: Vec3f);
}
